home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1316 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: overload.lbl.gov!news
  2. From: Mikhail Faiguenblat <mfaiguen@issserv4.lbl.gov>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Locaton of an array?
  5. Date: 12 Jan 1996 22:29:59 GMT
  6. Organization: Lawrence Berkeley Laboratory, Berkeley CA
  7. Message-ID: <4d6nd7$4gg@overload.lbl.gov>
  8. References: <4d4iqk$hs3@overload.lbl.gov> <4d698s$g4r@news.iag.net>
  9. NNTP-Posting-Host: issserv4.lbl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.12 (X11; I; SunOS 5.4 sun4d)
  14. X-URL: news:4d698s$g4r@news.iag.net
  15.  
  16. Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) wrote:
  17. [stuff deleted]
  18. :    Btw, just  out of curiosity, why do you care where it lives in  
  19. :    absolute RAM?
  20.  
  21. I just posted the description of the problem.
  22. Also, if anyone has written or knows of a C program that uses DMA, how did
  23. you deal with the issue of having to specify the physical addresses (I do not
  24. know if that is the issue for other processors, but for x86 it is).
  25.  
  26. : By the way, the output of %p (as also the result of the (int) cast on
  27. : a pointer) is upto the implementation. C can be implemented on machines
  28. : which have no natural mapping onto a flat address space, so the
  29. : original question may not have a definite meaning. An answer to the
  30. : `why' that you ask is definitely required before more help can be
  31. : provided.
  32.  
  33. Ok, so C works with virtual addresses, and all the registers (such as
  34. segment register, offset register, etc.) also store virtual addresses.
  35. Also, a program when being executed writes to and reads from real memory.
  36. This means that somewhere there is a virtual memory mamnager (?) which 
  37. keeps track of which segment of virtual memory corresponds to which
  38. segment of real memory.
  39. Is it done on kernel level?
  40. I do remember that SB drivers on Linux use DMA, and they are linked into the
  41. kernel and have a special buffer used for DMA transfer.
  42.  
  43. Mikhail
  44.  
  45.